@layout("/common/_container.html"){
<div class="ibox float-e-margins">
	<div class="ibox-content">
		<div class="form-horizontal" id="userInfoForm">
			
			<input type="hidden" id="id" value="${user.id}">
			<div class="row" >
				<div class="col-sm-6 b-r">
					<#avatar name="头像" id="avatarUrl" avatarImg="${user.avatarUrl}"/>
				</div>
			</div>
			<div class="row" >
				<div class="col-sm-6 b-r">
					<#input id="account" name="账户"  placeholder="请输入账户"   underline="false"   must="must" value="${user.account}"/>
				</div>
				<div class="col-sm-6">
					<#input id="name" name="姓名"  placeholder="请输入姓名"   underline="false"   must="must" value="${user.name}"/>
				</div>
			</div>
			<div class="row ">
				<div class="col-sm-6 b-r">
					<#select id="roleid" name="角色"    underline="false"   must="must">
						<option value="">请选择角色</option>
						@for(item in roleList){
							@var id = item.id+"";
							@if(user.roleid==id){
								<option value="${item.id}" selected>${item.name}</option>
							@}else{
								<option value="${item.id}">${item.name}</option>
							@}
						@}
					</#select>
				</div>
				<div class="col-sm-6">
					@if(user.status==1){
						<#input name="状态" type="checkbox" class="js-switch" id="status"    underline="false"   must="must" checked="checked" />
					@}else{
						<#input name="状态" type="checkbox" class="js-switch" id="status"    underline="false"   must="must"  />
					@}
				</div>
		</div>
		<div class="row ">
				<div class="col-sm-6 b-r">
					<#input id="email" name="邮箱" type="email"  placeholder="请输入邮箱"   underline="false"    value="${user.email}"/>
				</div>
				<div class="col-sm-6">
					<#input id="phone" name="电话"   placeholder="请输入电话"  underline="false"   value="${user.phone}" />
				</div>
		</div>
		<div class="row ">

				<div class="col-sm-6 b-r">
					<#select id="sex" name="性别"  underline="false" >
						<option value="0">请选择性别</option>
						@if(user.sex==1){
							<option value="1" selected>男</option>
						@}else{
							<option value="1">男</option>
						@}
						@if(user.sex==2){
							<option value="2" selected>女</option>
						@}else{
							<option value="2">女</option>
						@}
					</#select>
				</div>
	</div>
	<div class="row ">
				<div class="col-sm-6">
					<#input id="birthday" name="出生日期"   placeholder="yyyy-MM-dd"  underline="false"    value="${user.birthday}"  />
				</div>
			</div>
			<div class="row btn-group-m-t">
				<div class="col-sm-12 tr">
					<#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="UserInfoDlg.editSubmit()"/>
					<#button btnCss="danger btnGray" name="取消" id="cancel" icon="fa-eraser" clickFun="UserInfoDlg.close()"/>
				</div>
			</div>
		</div>
	</div>
</div>
<script>
//执行一个laydate实例
	laydate.render({
  	elem: '#birthday' //指定元素
  	,theme: '#393D49'
	});
</script>
<script src="${ctxPath}/static/modular/system/user/user_info.js"></script>
@}
